import { defineStore } from 'pinia'

export const userStore = defineStore('userInfo', {
    state: () => ({
        menuList: [],
        hasAuthMenuRoutes: []
    }),
    getters: {
        getMenuList(){
            return this.menuList || []
        },
        getHasAuthMenuRoutes(){
            return this.hasAuthMenuRoutes || []
        }
    },
    actions: {
        setMenuList(menuList){
            this.menuList = menuList
        },
        setHasAuthMenuRoutes(hasAuthMenuRoutes){
            this.hasAuthMenuRoutes = hasAuthMenuRoutes
        }
    }
})